/*
 * Wll2Interpreter.cpp
 *
 *  Created on: 2016-1-5
 *      Author: wll
 */

#include "Wll2Interpreter.h"
#include "Wll2InterpreterLL1Impl.h"

Wll2Interpreter* Wll2Interpreter::GetDefaultWll2Interpreter()
{
    Wll2Interpreter* instance = nullptr;
    if (instance == nullptr)
    {
        instance = new Wll2Interpreter(nullptr);
    }
    return instance;
}

bool Wll2Interpreter::InterpretWllVersion(const std::vector<Symbols>& input_symbols, std::vector<Symbols>& output_symbols)
{
	Wll2InterpreterLL1Impl interpreter(input_symbols, output_symbols, this);
	return interpreter.InterpretWll();
}
